package com.qfedu.tantu.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.util.Date;

/**
 * 酒店预订表(TReserve)实体类
 *
 * @author makejava
 * @since 2022-07-01 20:09:48
 */
@Data
@TableName("t_reserve")
@NoArgsConstructor
public class Reserve implements Serializable {
    private static final long serialVersionUID = -81791707205742234L;
    /**
     * id
     */
    @TableId(type = IdType.AUTO)
    private Integer id;
    /**
     * 下单人姓名
     */
    private String peoplename;
    /**
     * 入住人数
     */
    private Integer mun;
    /**
     * 下单人手机号
     */
    private String phone;
    /**
     * 下单人身份证号
     */
    private String idnum;
    /**
     * 下单时间
     */
    private Double housprice;
    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date ctime;
    private int token;
    private Integer flag;//支付状态1支付，2未支付

    public Reserve(String peoplename, Integer mun, String phone, String idnum, Double housprice, int token) {
        this.peoplename = peoplename;
        this.mun = mun;
        this.phone = phone;
        this.idnum = idnum;
        this.housprice = housprice;
        this.ctime = new Date();
        this.token = token;
        this.flag=1;
    }
}

